﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace COFE.Core.Tasks
{
    /// <summary>
    /// Bind multiple ICOFEActions to run together, then invoke them.
    /// </summary>
    public interface ICOFEActionQueue
    {
        /// <summary>
        /// Current status of this task.
        /// </summary>
        StatusType Status { get; }

        /// <summary>
        /// Current action id.
        /// </summary>
        Int32 CurrentAction { get; }

        /// <summary>
        /// Current action id.
        /// </summary>
        Int32 TotalActions { get; }

        /// <summary>
        /// A list of actions included in this task.
        /// </summary>
        ICOFEAction this[int id] { get; }


        event EventHandler<TaskProgressEventArgs> Progress;

        /// <summary>
        /// This should be called before Invoke() method is called.
        /// </summary>
        /// <param name="action"></param>
        void Enqueue(ICOFEAction action);

        void Invoke();
    }
}
